package io.renren.modules.yckj.service.impl;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.modules.yckj.dao.AdsDao;
import io.renren.modules.yckj.dto.AdsDTO;
import io.renren.modules.yckj.entity.AdsEntity;
import io.renren.modules.yckj.service.AdsService;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 广告表
 *
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0 2025-04-17
 */
@Service
public class AdsServiceImpl extends CrudServiceImpl<AdsDao, AdsEntity, AdsDTO> implements AdsService {

    @Override
    public QueryWrapper<AdsEntity> getWrapper(Map<String, Object> params){
        String id = (String)params.get("id");

        QueryWrapper<AdsEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StrUtil.isNotBlank(id), "id", id);

        return wrapper;
    }


}